package cn.pubinfo.maven;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author kuancz
 * @date 2018/9/18
 */
@Mojo(name = "help")
public class HelpMojo extends AbstractMojo {
    private static final Logger logger = LoggerFactory.getLogger(HelpMojo.class);

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        String helpLine = "application.yml中填入：\n-----------------------------------------------------\n";
        helpLine += "spring:\n" +
                "  datasource:\n" +
                "    driver-class-name: com.mysql.jdbc.Driver\n" +
                "    username: root\n" +
                "    password: 123456\n" +
                "    url: jdbc:mysql://localhost:3306/xx?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT&useSSL=false";
        logger.info(helpLine + "\n-----------------------------------------------------\n");
    }
}
